-
Notifications
You must be signed in to change notification settings - Fork 174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Renamed 'Lances' to 'Strategic Formations', Expanded Functionality #5250
Conversation
Updated all references from `Lance` to `StrategicFormation` in multiple classes for clarity and better alignment with game terminology. This includes method names, variables, and comments to reflect the changes more accurately.
Renamed the `lances` variable to `strategicFormations` throughout the codebase for clarity. Added functionality to override strategic formation assignment and updated relevant logic to consider this override. Enhanced the strategic formation eligibility check and adjusted UI components to reflect these changes.
Consolidated text formatting into a single String based on formation status. Improved readability and maintainability by reducing repetitive code.
Removed an unnecessary log statement that printed the force name. Simplified the conditional check for reinforcement restrictions, ensuring better readability and maintainability.
Closes #5200 |
Why do I keep doing that: reopening. |
Replaced '&' with '&' to properly encode HTML entities in comments. Additionally, renamed the 'c' parameter to 'campaign' for clarity and consistency.
Removed the redundant check for parent forces being strategic formations. This simplification improves code readability and potentially enhances performance by eliminating unnecessary iterations.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5250 +/- ##
============================================
- Coverage 10.49% 10.47% -0.03%
Complexity 6039 6039
============================================
Files 957 959 +2
Lines 134731 135067 +336
Branches 19577 19650 +73
============================================
+ Hits 14140 14147 +7
- Misses 119240 119569 +329
Partials 1351 1351 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Limited testing and GitHub Co-Pilot didn't identify any issues.
# Conflicts: # MekHQ/src/mekhq/AtBGameThread.java
Key Note:
Lances
are what MHQ called any combatForce
, i.e. any combat node in your TO&E that contains at least one groundUnit
. When reading the below any instance of 'lance' is referring to the internal class and not the IS Formation.To reduce confusion
Lance.java
has been renamed toStrategicFormation.java
. The relevant methods and classes have also been renamed.A StratFor is considered to be any combat force in the TO&E that contains at least one ground unit and has no ancestor or descendant nodes which are also StratFors. Players can manually define individual forces to always be considered StratFors, or never considered StratFors. These overrides can be easily removed. Assigning or removing an override is accessed via the TO&E right-click menu.
StratFors are easily recognized by their bold nameplate. StratFors that have had their state overridden are also underlined.
A force that has had its StratFor status set to
true
will consider all units in that force, and all descendant forces, to be a part of that StratFor. This allows for deployment of entire companies at will (or greater).The Briefing Room has been updated to consider units in descendant forces, when determining force weight. Weight is derived from a mean of all individual forces in the StratFor, ignoring empty forces.
StratCon and AtB will consider any StratFor fair game when picking seed forces, so players should be advised to try and keep their forces roughly equal, where possible.
StratCon will no longer consider non-combat forces as fair game for assignment to a track (manual or via integrated command rights), or scenario seeding.